home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume11 / jove.pch / part01 next >
Encoding:
Internet Message Format  |  1987-09-15  |  54.5 KB

  1. Subject:  v11i045:  Jove upgrade kit, Part01/04
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rs@uunet.UU.NET
  5.  
  6. Submitted-by: Jonathan Payne  <jpayne@cs.rochester.edu>
  7. Posting-number: Volume 11, Issue 45
  8. Archive-name: jove.pch/Part01
  9.  
  10. Jove is a text editor that resembles emacs; it runs on Unix and MS-DOS.
  11. It's smaller than GNU, but bigger than micro-emacs.  The following set of
  12. patches upgrade version 4.6.1.4 to 4.7; the older version is what was
  13. distributed on the 4.3 tape, and published previously in this newsgroup.
  14.             --r$
  15.  
  16. #! /bin/sh
  17. # This is a shell archive.  Remove anything before this line, then unpack
  18. # it by saving it into a file and typing "sh file".  To overwrite existing
  19. # files, type "sh file -c".  You can also feed this as standard input via
  20. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  21. # will see the following message at the end:
  22. #        "End of archive 1 (of 4)."
  23. # Contents:  jove.pch.1
  24. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  25. if test -f 'jove.pch.1' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'jove.pch.1'\"
  27. else
  28. echo shar: Extracting \"'jove.pch.1'\" \(51694 characters\)
  29. sed "s/^X//" >'jove.pch.1' <<'END_OF_FILE'
  30. Xdiff -c ojove/Makefile jove/Makefile
  31. X*** ojove/Makefile    Thu Jul 16 09:14:01 1987
  32. X--- jove/Makefile    Fri Jun 19 16:13:05 1987
  33. X***************
  34. X*** 19,44 ****
  35. X  
  36. X  DESTDIR =
  37. X  TMPDIR = /tmp
  38. X! LIBDIR = /u/jpayne/jovelib
  39. X! BINDIR = /u/jpayne/bin
  40. X! MANDIR = /u/jpayne/manl
  41. X  MANEXT = l
  42. X  SHELL = /bin/csh
  43. X  
  44. X  # These should all just be right if the above ones are.
  45. X  JOVE = $(DESTDIR)$(BINDIR)/jove
  46. X- RECOVER = $(DESTDIR)$(LIBDIR)/recover
  47. X  TEACHJOVE = $(DESTDIR)$(BINDIR)/teachjove
  48. X  JOVERC = $(DESTDIR)$(LIBDIR)/.joverc
  49. X  CMDS.DOC = $(DESTDIR)$(LIBDIR)/cmds.doc
  50. X  TEACH-JOVE = $(DESTDIR)$(LIBDIR)/teach-jove
  51. X- PORTSRV = $(DESTDIR)$(LIBDIR)/portsrv
  52. X  JOVEM = $(DESTDIR)$(MANDIR)/jove.$(MANEXT)
  53. X- RECOVERM = $(DESTDIR)$(MANDIR)/recover.$(MANEXT)
  54. X  TEACHJOVEM = $(DESTDIR)$(MANDIR)/teachjove.$(MANEXT)
  55. X  
  56. X  # Select the right libraries for your system.
  57. X! #    2.9BSD:    LIBS = -ltermcap -ljobs
  58. X  #    v7:    LIBS = -ltermcap
  59. X  #    4.1BSD:    LIBS = -ltermcap -ljobs
  60. X  #    4.2BSD:    LIBS = -ltermcap
  61. X--- 19,43 ----
  62. X  
  63. X  DESTDIR =
  64. X  TMPDIR = /tmp
  65. X! LIBDIR = /nfs/socrates/usr/jpayne/jovelib
  66. X! BINDIR = /nfs/socrates/usr/jpayne/bin
  67. X! MANDIR = /nfs/socrates/usr/jpayne/manl
  68. X  MANEXT = l
  69. X  SHELL = /bin/csh
  70. X  
  71. X  # These should all just be right if the above ones are.
  72. X  JOVE = $(DESTDIR)$(BINDIR)/jove
  73. X  TEACHJOVE = $(DESTDIR)$(BINDIR)/teachjove
  74. X+ RECOVER = $(DESTDIR)$(LIBDIR)/recover
  75. X+ PORTSRV = $(DESTDIR)$(LIBDIR)/portsrv
  76. X  JOVERC = $(DESTDIR)$(LIBDIR)/.joverc
  77. X  CMDS.DOC = $(DESTDIR)$(LIBDIR)/cmds.doc
  78. X  TEACH-JOVE = $(DESTDIR)$(LIBDIR)/teach-jove
  79. X  JOVEM = $(DESTDIR)$(MANDIR)/jove.$(MANEXT)
  80. X  TEACHJOVEM = $(DESTDIR)$(MANDIR)/teachjove.$(MANEXT)
  81. X  
  82. X  # Select the right libraries for your system.
  83. X! #    2.10BSD:LIBS = -ltermcap
  84. X  #    v7:    LIBS = -ltermcap
  85. X  #    4.1BSD:    LIBS = -ltermcap -ljobs
  86. X  #    4.2BSD:    LIBS = -ltermcap
  87. X***************
  88. X*** 49,71 ****
  89. X  
  90. X  # If you are not VMUNIX (vax running Berkeley Version 4), you must specify
  91. X  # the -i flags (split I/D space) and maybe the -x option (for adb to work).
  92. X! #    2.9BSD:    LDFLAGS = -x -i
  93. X! #    v7:    LDFLAGS = -x -i
  94. X  #    4.1BSD:    LDFLAGS =
  95. X  #    4.2BSD:    LDFLAGS =
  96. X  #    4.3BSD:    LDFLAGS =
  97. X  #    SysV Rel. 2: LDFLAGS = -Ml
  98. X  
  99. X! LDFLAGS =
  100. X  
  101. X! CFLAGS = -O
  102. X  
  103. X! OBJECTS = keymaps.o funcdefs.o abbrev.o ask.o buf.o c.o case.o ctype.o \
  104. X!     delete.o disp.o extend.o fp.o fmt.o insert.o io.o iproc.o jove.o macros.o \
  105. X!     malloc.o marks.o misc.o move.o paragraph.o proc.o re.o re1.o rec.o \
  106. X!     scandir.o screen.o table.o term.o tune.o util.o vars.o version.o wind.o
  107. X  
  108. X! JOVESRC = funcdefs.c abbrev.c ask.c buf.c c.c case.c ctype.c \
  109. X      delete.c disp.c extend.c fp.c fmt.c insert.c io.c iproc.c \
  110. X      jove.c macros.c malloc.c marks.c misc.c move.c paragraph.c \
  111. X      proc.c re.c re1.c rec.c scandir.c screen.c table.c term.c util.c \
  112. X--- 48,82 ----
  113. X  
  114. X  # If you are not VMUNIX (vax running Berkeley Version 4), you must specify
  115. X  # the -i flags (split I/D space) and maybe the -x option (for adb to work).
  116. X! #    2.10BSD:LDFLAGS =
  117. X! #    v7:    LDFLAGS =
  118. X  #    4.1BSD:    LDFLAGS =
  119. X  #    4.2BSD:    LDFLAGS =
  120. X  #    4.3BSD:    LDFLAGS =
  121. X  #    SysV Rel. 2: LDFLAGS = -Ml
  122. X+ #
  123. X+ # SEPFLAG should be:
  124. X+ #    not on a PDP-11:        SEPFLAG =
  125. X+ #    PDP-11 with separate I&D:    SEPFLAG = -i
  126. X+ #    PDP-11 without separate I&D:    SEPFLAG = -n
  127. X  
  128. X! LDFLAGS = -g
  129. X! SEPFLAG =
  130. X  
  131. X! CFLAGS = -g
  132. X  
  133. X! BASESEG = funcdefs.o keymaps.o argcount.o ask.o buf.o ctype.o delete.o \
  134. X!       disp.o fmt.o insert.o io.o jove.o malloc.o marks.o misc.o re.o \
  135. X!       screen.o table.o tune.o util.o vars.o version.o
  136. X! OVLAY1 = abbrev.o rec.o paragraph.o
  137. X! OVLAY2 = c.o wind.o fp.o move.o
  138. X! OVLAY3 = extend.o macros.o
  139. X! OVLAY4 = iproc.o re1.o
  140. X! OVLAY5 = proc.o scandir.o term.o case.o
  141. X  
  142. X! OBJECTS = $(BASESEG) $(OVLAY1) $(OVLAY2) $(OVLAY3) $(OVLAY4) $(OVLAY5)
  143. X! 
  144. X! JOVESRC = funcdefs.c abbrev.c argcount.c ask.c buf.c c.c case.c ctype.c \
  145. X      delete.c disp.c extend.c fp.c fmt.c insert.c io.c iproc.c \
  146. X      jove.c macros.c malloc.c marks.c misc.c move.c paragraph.c \
  147. X      proc.c re.c re1.c rec.c scandir.c screen.c table.c term.c util.c \
  148. X***************
  149. X*** 76,83 ****
  150. X  HEADERS = ctype.h io.h jove.h re.h rec.h table.h temp.h termcap.h tune.h
  151. X  
  152. X  DOCS =    doc/cmds.doc.nr doc/example.rc doc/jove.1 doc/jove.2 doc/jove.3 \
  153. X!     doc/jove.4 doc/jove.nr doc/recover.nr doc/system.rc doc/teach-jove \
  154. X!     doc/teachjove.nr doc/README
  155. X  
  156. X  BACKUPS = $(HEADERS) $(JOVESRC) iproc-pipes.c iproc-ptys.c \
  157. X      teachjove.c recover.c setmaps.c portsrv.c tune.template \
  158. X--- 87,94 ----
  159. X  HEADERS = ctype.h io.h jove.h re.h rec.h table.h temp.h termcap.h tune.h
  160. X  
  161. X  DOCS =    doc/cmds.doc.nr doc/example.rc doc/jove.1 doc/jove.2 doc/jove.3 \
  162. X!     doc/jove.4 doc/jove.5 doc/jove.nr doc/system.rc \
  163. X!     doc/teach-jove doc/teachjove.nr doc/README
  164. X  
  165. X  BACKUPS = $(HEADERS) $(JOVESRC) iproc-pipes.c iproc-ptys.c \
  166. X      teachjove.c recover.c setmaps.c portsrv.c tune.template \
  167. X***************
  168. X*** 87,93 ****
  169. X  all:    xjove recover teachjove portsrv
  170. X  
  171. X  xjove:    $(OBJECTS)
  172. X!     $(CC) $(LDFLAGS) -o xjove $(OBJECTS) version.o $(LIBS)
  173. X      @-size xjove
  174. X      @-date
  175. X  
  176. X--- 98,104 ----
  177. X  all:    xjove recover teachjove portsrv
  178. X  
  179. X  xjove:    $(OBJECTS)
  180. X!     $(CC) $(LDFLAGS) -o xjove $(OBJECTS) $(LIBS);
  181. X      @-size xjove
  182. X      @-date
  183. X  
  184. X***************
  185. X*** 131,138 ****
  186. X  $(TEACH-JOVE): doc/teach-jove
  187. X      install -c -m 644 doc/teach-jove $(TEACH-JOVE)
  188. X  
  189. X! doc/cmds.doc:    doc/cmds.doc.nr doc/jove.4
  190. X!     nroff doc/cmds.doc.nr doc/jove.4 > doc/cmds.doc
  191. X  
  192. X  $(CMDS.DOC): doc/cmds.doc
  193. X      install -c -m 644 doc/cmds.doc $(CMDS.DOC)
  194. X--- 142,149 ----
  195. X  $(TEACH-JOVE): doc/teach-jove
  196. X      install -c -m 644 doc/teach-jove $(TEACH-JOVE)
  197. X  
  198. X! doc/cmds.doc:    doc/cmds.doc.nr doc/jove.4 doc/jove.5
  199. X!     nroff doc/cmds.doc.nr doc/jove.4 doc/jove.5 > doc/cmds.doc
  200. X  
  201. X  $(CMDS.DOC): doc/cmds.doc
  202. X      install -c -m 644 doc/cmds.doc $(CMDS.DOC)
  203. X***************
  204. X*** 158,169 ****
  205. X           -e 's;SHELL;$(SHELL);' doc/jove.nr > /tmp/jove.nr
  206. X      install -m 644 /tmp/jove.nr $(JOVEM)
  207. X  
  208. X- $(RECOVERM): doc/recover.nr
  209. X-     @sed -e 's;TMPDIR;$(TMPDIR);' \
  210. X-          -e 's;LIBDIR;$(LIBDIR);' \
  211. X-          -e 's;SHELL;$(SHELL);' doc/recover.nr > /tmp/recover.nr
  212. X-     install -m 644 /tmp/recover.nr $(RECOVERM)
  213. X- 
  214. X  $(TEACHJOVEM): doc/teachjove.nr
  215. X      @sed -e 's;TMPDIR;$(TMPDIR);' \
  216. X           -e 's;LIBDIR;$(LIBDIR);' \
  217. X--- 169,174 ----
  218. X***************
  219. X*** 178,184 ****
  220. X      @echo Done
  221. X  
  222. X  tags:
  223. X!     ctags -w $(JOVESRC) $(HEADERS)
  224. X  
  225. X  ciall:
  226. X      ci $(BACKUPS)
  227. X--- 183,189 ----
  228. X      @echo Done
  229. X  
  230. X  tags:
  231. X!     ctags -w $(JOVESRC) $(HEADERS) iproc-ptys.c
  232. X  
  233. X  ciall:
  234. X      ci $(BACKUPS)
  235. X***************
  236. X*** 189,195 ****
  237. X  jove.shar:
  238. X      shar $(BACKUPS) > jove.shar
  239. X  
  240. X! backup:
  241. X      tar cf backup $(BACKUPS)
  242. X  
  243. X  tape-backup:
  244. X--- 194,200 ----
  245. X  jove.shar:
  246. X      shar $(BACKUPS) > jove.shar
  247. X  
  248. X! backup: $(BACKUPS)
  249. X      tar cf backup $(BACKUPS)
  250. X  
  251. X  tape-backup:
  252. Xdiff -c ojove/Ovmakefile jove/Ovmakefile
  253. X*** ojove/Ovmakefile    Thu Jul 16 09:14:02 1987
  254. X--- jove/Ovmakefile    Fri Jun 12 11:23:45 1987
  255. X***************
  256. X*** 61,71 ****
  257. X  
  258. X  COFLAGS = -rworking -q
  259. X  
  260. X! BASESEG = funcdefs.o keymaps.o ask.o buf.o ctype.o delete.o disp.o fmt.o fp.o \
  261. X!       insert.o io.o jove.o malloc.o macros.o marks.o misc.o move.o re.o \
  262. X!       screen.o table.o tune.o util.o vars.o version.o
  263. X! OVLAY1 = abbrev.o rec.o paragraph.o
  264. X! OVLAY2 = c.o wind.o
  265. X  OVLAY3 = extend.o
  266. X  OVLAY4 = iproc.o re1.o
  267. X  OVLAY5 = proc.o scandir.o term.o case.o
  268. X--- 61,71 ----
  269. X  
  270. X  COFLAGS = -rworking -q
  271. X  
  272. X! BASESEG = funcdefs.o keymaps.o argcount.o ask.o buf.o ctype.o delete.o disp.o fmt.o fp.o \
  273. X!       insert.o io.o jove.o malloc.o marks.o misc.o move.o re.o \
  274. X!       screen.o table.o tune.o util.o version.o
  275. X! OVLAY1 = abbrev.o rec.o paragraph.o macros.o
  276. X! OVLAY2 = c.o wind.o vars.o
  277. X  OVLAY3 = extend.o
  278. X  OVLAY4 = iproc.o re1.o
  279. X  OVLAY5 = proc.o scandir.o term.o case.o
  280. X***************
  281. X*** 72,78 ****
  282. X  
  283. X  OBJECTS = $(BASESEG) $(OVLAY1) $(OVLAY2) $(OVLAY3) $(OVLAY4) $(OVLAY5)
  284. X  
  285. X! C-FILES = funcdefs.c abbrev.c ask.c buf.c c.c case.c ctype.c delete.c disp.c \
  286. X      extend.c fmt.c fp.c insert.c io.c iproc.c iproc-pipes.c iproc-ptys.c \
  287. X      jove.c macros.c malloc.c marks.c misc.c move.c paragraph.c proc.c \
  288. X      re.c re1.c rec.c scandir.c screen.c table.c term.c util.c vars.c version.c \
  289. X--- 72,78 ----
  290. X  
  291. X  OBJECTS = $(BASESEG) $(OVLAY1) $(OVLAY2) $(OVLAY3) $(OVLAY4) $(OVLAY5)
  292. X  
  293. X! C-FILES = funcdefs.c abbrev.c argcount.c ask.c buf.c c.c case.c ctype.c delete.c disp.c \
  294. X      extend.c fmt.c fp.c insert.c io.c iproc.c iproc-pipes.c iproc-ptys.c \
  295. X      jove.c macros.c malloc.c marks.c misc.c move.c paragraph.c proc.c \
  296. X      re.c re1.c rec.c scandir.c screen.c table.c term.c util.c vars.c version.c \
  297. XCommon subdirectories: ojove/RCS and jove/RCS
  298. Xdiff -c ojove/README jove/README
  299. X*** ojove/README    Thu Jul 16 09:14:03 1987
  300. X--- jove/README    Fri Feb  6 11:32:32 1987
  301. X***************
  302. X*** 146,152 ****
  303. X  reads an initialization file in the user's home directory, and "example.rc"
  304. X  is mine.
  305. X  
  306. X! The files "jove.[1234]" in DOC are the official JOVE manual.  I got
  307. X  permission from Richard Stallman to use his manual for the original EMACS,
  308. X  modifying it where necessary for JOVE.  Lots of work was done by Brian
  309. X  Harvey on this manual.
  310. X--- 146,152 ----
  311. X  reads an initialization file in the user's home directory, and "example.rc"
  312. X  is mine.
  313. X  
  314. X! The files "jove.[12345]" in DOC are the official JOVE manual.  I got
  315. X  permission from Richard Stallman to use his manual for the original EMACS,
  316. X  modifying it where necessary for JOVE.  Lots of work was done by Brian
  317. X  Harvey on this manual.
  318. Xdiff -c ojove/abbrev.c jove/abbrev.c
  319. X*** ojove/abbrev.c    Thu Jul 16 09:14:04 1987
  320. X--- jove/abbrev.c    Fri Jun 12 10:50:08 1987
  321. X***************
  322. X*** 102,110 ****
  323. X      struct abbrev    *ap;
  324. X  
  325. X      DOTsave(&point);
  326. X-     exp = 1;
  327. X      WITH_TABLE(curbuf->b_major)
  328. X!     BackWord();
  329. X      while (curchar < point.p_char && ismword(c = linebuf[curchar])) {
  330. X          if (AutoCaseAbbrev) {
  331. X              if (isupper(c)) {
  332. X--- 102,109 ----
  333. X      struct abbrev    *ap;
  334. X  
  335. X      DOTsave(&point);
  336. X      WITH_TABLE(curbuf->b_major)
  337. X!     b_word(1);
  338. X      while (curchar < point.p_char && ismword(c = linebuf[curchar])) {
  339. X          if (AutoCaseAbbrev) {
  340. X              if (isupper(c)) {
  341. X***************
  342. X*** 112,118 ****
  343. X                  c = tolower(c);
  344. X              }
  345. X          }
  346. X- 
  347. X          *wp++ = c;
  348. X          curchar++;
  349. X      }
  350. X--- 111,116 ----
  351. X***************
  352. X*** 124,141 ****
  353. X          SetDot(&point);
  354. X          return;
  355. X      }
  356. X!     DoTimes(DelPChar(), (wp - wordbuf));
  357. X  
  358. X      for (cp = ap->a_phrase; c = *cp; ) {
  359. X          if (AutoCaseAbbrev) {
  360. X!             Insert(islower(c) && UC_count &&
  361. X!                    (cp == ap->a_phrase || (UC_count > 1 && (*(cp - 1) == ' '))) ?
  362. X!                 toupper(c) : c);
  363. X!         }
  364. X!         else {
  365. X!             Insert(c);
  366. X!         }
  367. X!         cp++;
  368. X      }
  369. X  
  370. X      if (ap->a_cmdhook != 0)
  371. X--- 122,137 ----
  372. X          SetDot(&point);
  373. X          return;
  374. X      }
  375. X!     del_char(BACKWARD, (wp - wordbuf));
  376. X  
  377. X      for (cp = ap->a_phrase; c = *cp; ) {
  378. X          if (AutoCaseAbbrev) {
  379. X!             insert_c(islower(c) && UC_count &&
  380. X!                    (cp == ap->a_phrase || (UC_count > 1 && (cp[-1] == ' '))) ?
  381. X!                 toupper(c) : c, 1);
  382. X!         } else
  383. X!             insert_c(c, 1);
  384. X!         cp += 1;
  385. X      }
  386. X  
  387. X      if (ap->a_cmdhook != 0)
  388. XOnly in jove: argcount.c
  389. Xdiff -c ojove/ask.c jove/ask.c
  390. X*** ojove/ask.c    Thu Jul 16 09:14:06 1987
  391. X--- jove/ask.c    Fri Jul 10 09:25:49 1987
  392. X***************
  393. X*** 15,20 ****
  394. X--- 15,22 ----
  395. X  #    include <sys/stat.h>
  396. X  #endif
  397. X  
  398. X+ int    DoEVexpand = NO;    /* should we expand evironment variables? */
  399. X+ 
  400. X  int    Asking = NO;
  401. X  char    Minibuf[LBSIZE];
  402. X  private Line    *CurAskPtr = 0;    /* points at some line in mini-buffer */
  403. X***************
  404. X*** 57,63 ****
  405. X      SetBuf(saveb);
  406. X  }
  407. X  
  408. X! static char *
  409. X  real_ask(delim, d_proc, def, prompt)
  410. X  char    *delim,
  411. X      *def,
  412. X--- 59,106 ----
  413. X      SetBuf(saveb);
  414. X  }
  415. X  
  416. X! /* look for any substrings of the form $foo in linebuf, and expand
  417. X!    them according to their value in the environment (if possible) -
  418. X!    this munges all over curchar and linebuf without giving it a second
  419. X!    thought (I must be getting lazy in my old age) */
  420. X! private
  421. X! EVexpand()
  422. X! {
  423. X!     register int    c;
  424. X!     register char    *lp = linebuf,
  425. X!             *ep;
  426. X!     char    varname[128],
  427. X!         *vp,
  428. X!         *lp_start;
  429. X!     Mark    *m = MakeMark(curline, curchar, M_FLOATER);
  430. X! 
  431. X!     while (c = *lp++) {
  432. X!         if (c != '$')
  433. X!             continue;
  434. X!         lp_start = lp - 1;    /* the $ */
  435. X!         vp = varname;
  436. X!         while (c = *lp++) {
  437. X!             if (!isword(c))
  438. X!                 break;
  439. X!             *vp++ = c;
  440. X!         }
  441. X!         *vp = '\0';
  442. X!         /* if we find an env. variable with the right
  443. X!            name, we insert it in linebuf, and then delete
  444. X!            the variable name that we're replacing - and
  445. X!             then we continue in case there are others ... */
  446. X!         if (ep = getenv(varname)) {
  447. X!             curchar = lp_start - linebuf;
  448. X!             ins_str(ep, NO);
  449. X!             del_char(FORWARD, strlen(varname) + 1);
  450. X!             lp = linebuf + curchar;
  451. X!         }
  452. X!     }
  453. X!     ToMark(m);
  454. X!     DelMark(m);
  455. X! }
  456. X! 
  457. X! private char *
  458. X  real_ask(delim, d_proc, def, prompt)
  459. X  char    *delim,
  460. X      *def,
  461. X***************
  462. X*** 72,79 ****
  463. X      int    abort = 0,
  464. X          no_typed = 0;
  465. X      data_obj    *push_cmd = LastCmd;
  466. X!     int    o_exp = exp,
  467. X!         o_exp_p = exp_p;
  468. X  
  469. X      if (InAsk)
  470. X          complain((char *) 0);
  471. X--- 115,122 ----
  472. X      int    abort = 0,
  473. X          no_typed = 0;
  474. X      data_obj    *push_cmd = LastCmd;
  475. X!     int    o_a_v = arg_value(),
  476. X!         o_i_an_a = is_an_arg();
  477. X  
  478. X      if (InAsk)
  479. X          complain((char *) 0);
  480. X***************
  481. X*** 95,102 ****
  482. X          }
  483. X  
  484. X      for (;;) {
  485. X!         exp = 1;
  486. X!         exp_p = NO;
  487. X          last_cmd = this_cmd;
  488. X          init_strokes();
  489. X  cont:        s_mess("%s%s", prompt, linebuf);
  490. X--- 138,144 ----
  491. X          }
  492. X  
  493. X      for (;;) {
  494. X!         clr_arg_value();
  495. X          last_cmd = this_cmd;
  496. X          init_strokes();
  497. X  cont:        s_mess("%s%s", prompt, linebuf);
  498. X***************
  499. X*** 103,120 ****
  500. X          Asking = curchar + prompt_len;
  501. X          c = getch();
  502. X          if ((c == EOF) || index(delim, c)) {
  503. X              if (d_proc == 0 || (*d_proc)(c) == 0)
  504. X                  goto cleanup;
  505. X          } else switch (c) {
  506. X!         case CTL(G):
  507. X              message("[Aborted]");
  508. X              abort++;
  509. X              goto cleanup;
  510. X  
  511. X!         case CTL(N):
  512. X!         case CTL(P):
  513. X              if (CurAskPtr != 0) {
  514. X!                 int    n = (c == CTL(P) ? -exp : exp);
  515. X  
  516. X                  CurAskPtr = next_line(CurAskPtr, n);
  517. X                  if (CurAskPtr == curbuf->b_first && CurAskPtr->l_next != 0)
  518. X--- 145,164 ----
  519. X          Asking = curchar + prompt_len;
  520. X          c = getch();
  521. X          if ((c == EOF) || index(delim, c)) {
  522. X+             if (DoEVexpand)
  523. X+                 EVexpand();
  524. X              if (d_proc == 0 || (*d_proc)(c) == 0)
  525. X                  goto cleanup;
  526. X          } else switch (c) {
  527. X!         case CTL('G'):
  528. X              message("[Aborted]");
  529. X              abort++;
  530. X              goto cleanup;
  531. X  
  532. X!         case CTL('N'):
  533. X!         case CTL('P'):
  534. X              if (CurAskPtr != 0) {
  535. X!                 int    n = (c == CTL('P') ? -arg_value() : arg_value());
  536. X  
  537. X                  CurAskPtr = next_line(CurAskPtr, n);
  538. X                  if (CurAskPtr == curbuf->b_first && CurAskPtr->l_next != 0)
  539. X***************
  540. X*** 127,133 ****
  541. X              }
  542. X              break;
  543. X  
  544. X!         case CTL(R):
  545. X              if (def)
  546. X                  ins_str(def, NO);
  547. X              else
  548. X--- 171,177 ----
  549. X              }
  550. X              break;
  551. X  
  552. X!         case CTL('R'):
  553. X              if (def)
  554. X                  ins_str(def, NO);
  555. X              else
  556. X***************
  557. X*** 151,158 ****
  558. X      pop_env(savejmp);
  559. X  
  560. X      LastCmd = push_cmd;
  561. X!     exp_p = o_exp_p;
  562. X!     exp = o_exp;
  563. X      no_typed = (linebuf[0] == '\0');
  564. X      strcpy(Minibuf, linebuf);
  565. X      SetBuf(saveb);
  566. X--- 195,202 ----
  567. X      pop_env(savejmp);
  568. X  
  569. X      LastCmd = push_cmd;
  570. X!     set_arg_value(o_a_v);
  571. X!     set_is_an_arg(o_i_an_a);
  572. X      no_typed = (linebuf[0] == '\0');
  573. X      strcpy(Minibuf, linebuf);
  574. X      SetBuf(saveb);
  575. X***************
  576. X*** 212,218 ****
  577. X      return real_ask(delim, d_proc, def, prompt);
  578. X  }
  579. X  
  580. X! /* VARARGS2 */
  581. X  
  582. X  yes_or_no_p(fmt, va_alist)
  583. X  char    *fmt;
  584. X--- 256,262 ----
  585. X      return real_ask(delim, d_proc, def, prompt);
  586. X  }
  587. X  
  588. X! /* VARARGS1 */
  589. X  
  590. X  yes_or_no_p(fmt, va_alist)
  591. X  char    *fmt;
  592. X***************
  593. X*** 230,236 ****
  594. X          Asking = strlen(prompt);    /* so redisplay works */
  595. X          c = getch();
  596. X          Asking = NO;
  597. X!         switch (Upper(c)) {
  598. X          case 'Y':
  599. X              return YES;
  600. X  
  601. X--- 274,280 ----
  602. X          Asking = strlen(prompt);    /* so redisplay works */
  603. X          c = getch();
  604. X          Asking = NO;
  605. X!         switch (CharUpcase(c)) {
  606. X          case 'Y':
  607. X              return YES;
  608. X  
  609. X***************
  610. X*** 237,243 ****
  611. X          case 'N':
  612. X              return NO;
  613. X  
  614. X!         case CTL(G):
  615. X              complain("[Aborted]");
  616. X  
  617. X          default:
  618. X--- 281,287 ----
  619. X          case 'N':
  620. X              return NO;
  621. X  
  622. X!         case CTL('G'):
  623. X              complain("[Aborted]");
  624. X  
  625. X          default:
  626. X***************
  627. X*** 343,353 ****
  628. X              (linebuf[curchar - 1] != '/') &&
  629. X              (isdir(linebuf)));
  630. X      if (the_same && !is_ntdir) {
  631. X!         add_mess(n == 1 ? " [Unique]" : " [Ambiguous]");
  632. X          SitFor(7);
  633. X      }
  634. X      if (is_ntdir)
  635. X!         Insert('/');
  636. X  }
  637. X  
  638. X  extern int    alphacomp();
  639. X--- 387,397 ----
  640. X              (linebuf[curchar - 1] != '/') &&
  641. X              (isdir(linebuf)));
  642. X      if (the_same && !is_ntdir) {
  643. X!         add_mess((n == 1) ? " [Unique]" : " [Ambiguous]");
  644. X          SitFor(7);
  645. X      }
  646. X      if (is_ntdir)
  647. X!         insert_c('/', 1);
  648. X  }
  649. X  
  650. X  extern int    alphacomp();
  651. X***************
  652. X*** 438,444 ****
  653. X  {
  654. X      char    *ans,
  655. X          prompt[128],
  656. X!         *pretty_name = pr_name(def);
  657. X  
  658. X      if (prmt)
  659. X          sprintf(prompt, prmt);
  660. X--- 482,488 ----
  661. X  {
  662. X      char    *ans,
  663. X          prompt[128],
  664. X!         *pretty_name = pr_name(def, YES);
  665. X  
  666. X      if (prmt)
  667. X          sprintf(prompt, prmt);
  668. Xdiff -c ojove/buf.c jove/buf.c
  669. X*** ojove/buf.c    Thu Jul 16 09:14:07 1987
  670. X--- jove/buf.c    Tue Jun 23 13:50:25 1987
  671. X***************
  672. X*** 26,33 ****
  673. X  
  674. X  TogMinor(bit)
  675. X  {
  676. X!     if (exp_p) {
  677. X!         if (exp == 0)
  678. X              curbuf->b_minor &= ~bit;
  679. X          else
  680. X              curbuf->b_minor |= bit;
  681. X--- 26,33 ----
  682. X  
  683. X  TogMinor(bit)
  684. X  {
  685. X!     if (is_an_arg()) {
  686. X!         if (arg_value() == 0)
  687. X              curbuf->b_minor &= ~bit;
  688. X          else
  689. X              curbuf->b_minor |= bit;
  690. X***************
  691. X*** 147,153 ****
  692. X      offset = complete(bnames, prompt, RET_STATE);
  693. X      if (offset == EOF)
  694. X          complain((char *) 0);
  695. X!     if (offset == ORIGINAL)
  696. X          bname = Minibuf;
  697. X      else if (offset == NULLSTRING) {
  698. X          if (def)
  699. X--- 147,153 ----
  700. X      offset = complete(bnames, prompt, RET_STATE);
  701. X      if (offset == EOF)
  702. X          complain((char *) 0);
  703. X!     if (offset == ORIGINAL || offset == AMBIGUOUS)
  704. X          bname = Minibuf;
  705. X      else if (offset == NULLSTRING) {
  706. X          if (def)
  707. X***************
  708. X*** 171,177 ****
  709. X      SetBuf(do_select(curwind, bname));
  710. X  }
  711. X  
  712. X! static
  713. X  defb_wind(b)
  714. X  register Buffer *b;
  715. X  {
  716. X--- 171,177 ----
  717. X      SetBuf(do_select(curwind, bname));
  718. X  }
  719. X  
  720. X! private
  721. X  defb_wind(b)
  722. X  register Buffer *b;
  723. X  {
  724. X***************
  725. X*** 186,202 ****
  726. X  
  727. X      do {
  728. X          if (w->w_bufp == b) {
  729. X!             if (one_windp())
  730. X                  (void) do_select(w, alt);
  731. X              else {
  732. X!                 register Window    *save = w->w_next;
  733. X  
  734. X                  del_wind(w);
  735. X                  w = save->w_prev;
  736. X              }
  737. X!         }                
  738. X          w = w->w_next;
  739. X!     } while (w != fwind);
  740. X  }
  741. X  
  742. X  Buffer *
  743. X--- 186,202 ----
  744. X  
  745. X      do {
  746. X          if (w->w_bufp == b) {
  747. X!             if (one_windp() || alt != Mainbuf)
  748. X                  (void) do_select(w, alt);
  749. X              else {
  750. X!                 Window    *save = w->w_next;
  751. X  
  752. X                  del_wind(w);
  753. X                  w = save->w_prev;
  754. X              }
  755. X!         }
  756. X          w = w->w_next;
  757. X!     } while (w != fwind || w->w_bufp == b);
  758. X  }
  759. X  
  760. X  Buffer *
  761. X***************
  762. X*** 275,281 ****
  763. X              continue;
  764. X          if (IsModified(b)) {
  765. X              y_or_n = ask("No", "%s modified; should I save it? ", b->b_name);
  766. X!             if (Upper(*y_or_n) == 'Y') {
  767. X                  oldb = curbuf;
  768. X                  SetBuf(b);
  769. X                  SaveFile();
  770. X--- 275,281 ----
  771. X              continue;
  772. X          if (IsModified(b)) {
  773. X              y_or_n = ask("No", "%s modified; should I save it? ", b->b_name);
  774. X!             if (CharUpcase(*y_or_n) == 'Y') {
  775. X                  oldb = curbuf;
  776. X                  SetBuf(b);
  777. X                  SaveFile();
  778. X***************
  779. X*** 499,505 ****
  780. X  {
  781. X      struct stat    stbuf;
  782. X  
  783. X!     if (b->b_fname == 0 || stat(b->b_fname, &stbuf) == -1) {
  784. X          b->b_ino = 0;
  785. X          b->b_mtime = 0;
  786. X      } else {
  787. X--- 499,505 ----
  788. X  {
  789. X      struct stat    stbuf;
  790. X  
  791. X!     if (b->b_fname == 0 || stat(pr_name(b->b_fname, NO), &stbuf) == -1) {
  792. X          b->b_ino = 0;
  793. X          b->b_mtime = 0;
  794. X      } else {
  795. X***************
  796. X*** 524,537 ****
  797. X          bufname(b);
  798. X          set_ino(b);
  799. X          b->b_ntbf = 1;
  800. X-         if (force) {
  801. X-             Buffer    *oldb = curbuf;
  802. X- 
  803. X-             SetBuf(b);    /* this'll read the file */
  804. X-             SetBuf(oldb);
  805. X-         }
  806. X      }
  807. X  
  808. X      if (w)
  809. X          tiewind(w, b);
  810. X      return b;
  811. X--- 524,536 ----
  812. X          bufname(b);
  813. X          set_ino(b);
  814. X          b->b_ntbf = 1;
  815. X      }
  816. X+     if (force) {
  817. X+         Buffer    *oldb = curbuf;
  818. X  
  819. X+         SetBuf(b);    /* this'll read the file */
  820. X+         SetBuf(oldb);
  821. X+     }
  822. X      if (w)
  823. X          tiewind(w, b);
  824. X      return b;
  825. X***************
  826. X*** 549,563 ****
  827. X  SetBuf(newbuf)
  828. X  register Buffer    *newbuf;
  829. X  {
  830. X!     register Buffer    *oldb = curbuf;
  831. X  
  832. X      if (newbuf == curbuf || newbuf == 0)
  833. X          return;
  834. X  
  835. X      lsave();
  836. X      curbuf = newbuf;
  837. X!     curline = newbuf->b_dot;
  838. X!     curchar = newbuf->b_char;
  839. X      getDOT();
  840. X      /* Do the read now ... */
  841. X      if (curbuf->b_ntbf)
  842. X--- 548,570 ----
  843. X  SetBuf(newbuf)
  844. X  register Buffer    *newbuf;
  845. X  {
  846. X!     register Buffer    *oldb = curbuf,
  847. X!             *b;
  848. X  
  849. X      if (newbuf == curbuf || newbuf == 0)
  850. X          return;
  851. X  
  852. X+     /* check to see that we're selecting a valid buffer */
  853. X+     for (b = world; b != 0; b = b->b_next)
  854. X+         if (b == newbuf)
  855. X+             break;
  856. X+     if (b == 0)
  857. X+         complain("Internal error: (%x) is not a valid buffer pointer!", newbuf);
  858. X+ 
  859. X      lsave();
  860. X      curbuf = newbuf;
  861. X! /*    curline = newbuf->b_dot;
  862. X!     curchar = newbuf->b_char;    STUPID!! */
  863. X      getDOT();
  864. X      /* Do the read now ... */
  865. X      if (curbuf->b_ntbf)
  866. Xdiff -c ojove/c.c jove/c.c
  867. X*** ojove/c.c    Thu Jul 16 09:14:09 1987
  868. X--- jove/c.c    Wed Jun 24 12:43:21 1987
  869. X***************
  870. X*** 167,180 ****
  871. X      register char    c,
  872. X              syntax = (dir == FORWARD) ? _Op : _Cl;
  873. X  
  874. X-     exp = 1;
  875. X      if (dir == BACKWARD)
  876. X!         BackChar();
  877. X      c = linebuf[curchar];
  878. X      for (;;) {
  879. X          if (!skip_words && ismword(c)) {
  880. X              WITH_TABLE(curbuf->b_major)
  881. X!             (dir == FORWARD) ? ForWord() : BackWord();
  882. X              END_TABLE();
  883. X              break;
  884. X          } else if (has_syntax(c, syntax)) {
  885. X--- 167,179 ----
  886. X      register char    c,
  887. X              syntax = (dir == FORWARD) ? _Op : _Cl;
  888. X  
  889. X      if (dir == BACKWARD)
  890. X!         b_char(1);
  891. X      c = linebuf[curchar];
  892. X      for (;;) {
  893. X          if (!skip_words && ismword(c)) {
  894. X              WITH_TABLE(curbuf->b_major)
  895. X!             (dir == FORWARD) ? f_word(1) : b_word(1);
  896. X              END_TABLE();
  897. X              break;
  898. X          } else if (has_syntax(c, syntax)) {
  899. X***************
  900. X*** 181,187 ****
  901. X              FindMatch(dir);
  902. X              break;
  903. X          }
  904. X!         DoTimes(ForChar(), dir);
  905. X          if (eobp() || bobp())
  906. X              return;
  907. X          c = linebuf[curchar];
  908. X--- 180,186 ----
  909. X              FindMatch(dir);
  910. X              break;
  911. X          }
  912. X!         f_char(dir);
  913. X          if (eobp() || bobp())
  914. X              return;
  915. X          c = linebuf[curchar];
  916. X***************
  917. X*** 190,199 ****
  918. X  
  919. X  FSexpr()
  920. X  {
  921. X!     register int    num = exp;
  922. X  
  923. X!     if (exp < 0) {
  924. X!         exp = -exp;
  925. X          BSexpr();
  926. X      }
  927. X      while (--num >= 0)
  928. X--- 189,198 ----
  929. X  
  930. X  FSexpr()
  931. X  {
  932. X!     register int    num = arg_value();
  933. X  
  934. X!     if (num < 0) {
  935. X!         set_arg_value(-num);
  936. X          BSexpr();
  937. X      }
  938. X      while (--num >= 0)
  939. X***************
  940. X*** 202,211 ****
  941. X  
  942. X  FList()
  943. X  {
  944. X!     register int    num = exp;
  945. X  
  946. X!     if (exp < 0) {
  947. X!         exp = -exp;
  948. X          BList();
  949. X      }
  950. X      while (--num >= 0)
  951. X--- 201,210 ----
  952. X  
  953. X  FList()
  954. X  {
  955. X!     register int    num = arg_value();
  956. X  
  957. X!     if (num < 0) {
  958. X!         set_arg_value(-num);
  959. X          BList();
  960. X      }
  961. X      while (--num >= 0)
  962. X***************
  963. X*** 214,223 ****
  964. X  
  965. X  BSexpr()
  966. X  {
  967. X!     register int    num = exp;
  968. X  
  969. X!     if (exp < 0) {
  970. X!         exp = -exp;
  971. X          FSexpr();
  972. X      }
  973. X      while (--num >= 0)
  974. X--- 213,222 ----
  975. X  
  976. X  BSexpr()
  977. X  {
  978. X!     register int    num = arg_value();
  979. X  
  980. X!     if (num < 0) {
  981. X!         negate_arg_value();
  982. X          FSexpr();
  983. X      }
  984. X      while (--num >= 0)
  985. X***************
  986. X*** 226,235 ****
  987. X  
  988. X  BList()
  989. X  {
  990. X!     register int    num = exp;
  991. X  
  992. X!     if (exp < 0) {
  993. X!         exp = -exp;
  994. X          FList();
  995. X      }
  996. X      while (--num >= 0)
  997. X--- 225,234 ----
  998. X  
  999. X  BList()
  1000. X  {
  1001. X!     register int    num = arg_value();
  1002. X  
  1003. X!     if (num < 0) {
  1004. X!         negate_arg_value();
  1005. X          FList();
  1006. X      }
  1007. X      while (--num >= 0)
  1008. X***************
  1009. X*** 275,284 ****
  1010. X          (backslashed(linebuf, curchar)))
  1011. X          complain((char *) 0);
  1012. X      if (dir == FORWARD)
  1013. X!         ForChar();
  1014. X      bp = m_paren(c, dir, YES, NO);
  1015. X      if (dir == FORWARD)
  1016. X!         BackChar();
  1017. X      if (bp != 0)
  1018. X          SetDot(bp);
  1019. X      mp_error();    /* if there is an error the user wants to
  1020. X--- 274,283 ----
  1021. X          (backslashed(linebuf, curchar)))
  1022. X          complain((char *) 0);
  1023. X      if (dir == FORWARD)
  1024. X!         f_char(1);
  1025. X      bp = m_paren(c, dir, YES, NO);
  1026. X      if (dir == FORWARD)
  1027. X!         b_char(1);
  1028. X      if (bp != 0)
  1029. X          SetDot(bp);
  1030. X      mp_error();    /* if there is an error the user wants to
  1031. X***************
  1032. X*** 482,488 ****
  1033. X          SetDot(match_c);
  1034. X      }
  1035. X      SetDot(&open_c_pt);
  1036. X!     open_c_mark = MakeMark(curline, curchar, FLOATER);
  1037. X      indent_pos = calc_pos(linebuf, curchar);
  1038. X      /* search for a close comment; delete it if it exits */
  1039. X      SetDot(&close_c_pt);
  1040. X--- 481,487 ----
  1041. X          SetDot(match_c);
  1042. X      }
  1043. X      SetDot(&open_c_pt);
  1044. X!     open_c_mark = MakeMark(curline, curchar, M_FLOATER);
  1045. X      indent_pos = calc_pos(linebuf, curchar);
  1046. X      /* search for a close comment; delete it if it exits */
  1047. X      SetDot(&close_c_pt);
  1048. X***************
  1049. X*** 489,497 ****
  1050. X      if (close_at_dot == 0) {
  1051. X          slen = strlen(close_pat);
  1052. X          while (slen--)
  1053. X!             DelPChar();
  1054. X      }
  1055. X!     entry_mark = MakeMark(curline, curchar, FLOATER);
  1056. X      ToMark(open_c_mark);
  1057. X      /* always separate the comment body from anything preceeding it */
  1058. X      LineInsert(1);
  1059. X--- 488,496 ----
  1060. X      if (close_at_dot == 0) {
  1061. X          slen = strlen(close_pat);
  1062. X          while (slen--)
  1063. X!             del_char(BACKWARD, 1);
  1064. X      }
  1065. X!     entry_mark = MakeMark(curline, curchar, M_FLOATER);
  1066. X      ToMark(open_c_mark);
  1067. X      /* always separate the comment body from anything preceeding it */
  1068. X      LineInsert(1);
  1069. X***************
  1070. X*** 502,511 ****
  1071. X              if (!eolp())
  1072. X                  LineInsert(1);
  1073. X              else
  1074. X!                 line_move(FORWARD, NO);
  1075. X          } else if (*cp == ' ' || *cp == '\t') {
  1076. X              if (linebuf[curchar] != *cp)
  1077. X!                 Insert(*cp);
  1078. X          } else
  1079. X              /* Since we matched the open comment string on this
  1080. X                 line, we don't need to worry about crossing line
  1081. X--- 501,510 ----
  1082. X              if (!eolp())
  1083. X                  LineInsert(1);
  1084. X              else
  1085. X!                 line_move(FORWARD, 1, NO);
  1086. X          } else if (*cp == ' ' || *cp == '\t') {
  1087. X              if (linebuf[curchar] != *cp)
  1088. X!                 insert_c(*cp, 1);
  1089. X          } else
  1090. X              /* Since we matched the open comment string on this
  1091. X                 line, we don't need to worry about crossing line
  1092. X***************
  1093. X*** 512,518 ****
  1094. X                 boundaries. */
  1095. X              curchar++;
  1096. X      }
  1097. X!     savedot = MakeMark(curline, curchar, FLOATER);
  1098. X  
  1099. X      /* We need to strip the line header pattern of leading white space
  1100. X         since we need to match the line after all of its leading
  1101. X--- 511,517 ----
  1102. X                 boundaries. */
  1103. X              curchar++;
  1104. X      }
  1105. X!     savedot = MakeMark(curline, curchar, M_FLOATER);
  1106. X  
  1107. X      /* We need to strip the line header pattern of leading white space
  1108. X         since we need to match the line after all of its leading
  1109. X***************
  1110. X*** 529,556 ****
  1111. X          Bol();
  1112. X          DelWtSpace();
  1113. X          if (header_len && !strncmp(linebuf, cp, header_len))
  1114. X!             DoTimes(DelNChar(), header_len);
  1115. X          if (trailer_len) {
  1116. X              Eol();
  1117. X              if ((curchar > trailer_len) &&
  1118. X                  (!strncmp(&linebuf[curchar - trailer_len],
  1119. X                        l_trailer, trailer_len)))
  1120. X!                 DoTimes(DelPChar(), trailer_len);
  1121. X          }
  1122. X          if (curline->l_next != 0)
  1123. X!             line_move(FORWARD, NO);
  1124. X          else
  1125. X              break;
  1126. X      } while (curline != entry_mark->m_line->l_next);
  1127. X  
  1128. X!     DoSetMark(savedot->m_line, savedot->m_char);
  1129. X      ToMark(entry_mark);
  1130. X      saveRMargin = RMargin;
  1131. X      RMargin = saveRMargin - strlen(l_header) -
  1132. X            strlen(l_trailer) - indent_pos + 2;
  1133. X!     /* do not use the left margin */
  1134. X!     exp_p = NO;
  1135. X!     do_rfill();
  1136. X      RMargin = saveRMargin;
  1137. X      /* get back to the start of the comment */
  1138. X      PopMark(); 
  1139. X--- 528,553 ----
  1140. X          Bol();
  1141. X          DelWtSpace();
  1142. X          if (header_len && !strncmp(linebuf, cp, header_len))
  1143. X!             del_char(FORWARD, header_len);
  1144. X          if (trailer_len) {
  1145. X              Eol();
  1146. X              if ((curchar > trailer_len) &&
  1147. X                  (!strncmp(&linebuf[curchar - trailer_len],
  1148. X                        l_trailer, trailer_len)))
  1149. X!                 del_char(BACKWARD, trailer_len);
  1150. X          }
  1151. X          if (curline->l_next != 0)
  1152. X!             line_move(FORWARD, 1, NO);
  1153. X          else
  1154. X              break;
  1155. X      } while (curline != entry_mark->m_line->l_next);
  1156. X  
  1157. X!     do_set_mark(savedot->m_line, savedot->m_char);
  1158. X      ToMark(entry_mark);
  1159. X      saveRMargin = RMargin;
  1160. X      RMargin = saveRMargin - strlen(l_header) -
  1161. X            strlen(l_trailer) - indent_pos + 2;
  1162. X!     do_rfill(NO);
  1163. X      RMargin = saveRMargin;
  1164. X      /* get back to the start of the comment */
  1165. X      PopMark(); 
  1166. X***************
  1167. X*** 567,579 ****
  1168. X          else
  1169. X              ins_str(l_trailer, NO);
  1170. X          if (curline->l_next != 0)
  1171. X!             line_move(FORWARD, NO);
  1172. X          else 
  1173. X              break;
  1174. X      } while (curline != entry_mark->m_line->l_next);
  1175. X      /* handle the close comment symbol */
  1176. X      if (curline == entry_mark->m_line->l_next) {
  1177. X!         line_move(BACKWARD, NO);
  1178. X          Eol();
  1179. X      }
  1180. X      DelWtSpace();
  1181. X--- 564,576 ----
  1182. X          else
  1183. X              ins_str(l_trailer, NO);
  1184. X          if (curline->l_next != 0)
  1185. X!             line_move(FORWARD, 1, NO);
  1186. X          else 
  1187. X              break;
  1188. X      } while (curline != entry_mark->m_line->l_next);
  1189. X      /* handle the close comment symbol */
  1190. X      if (curline == entry_mark->m_line->l_next) {
  1191. X!         line_move(BACKWARD, 1, NO);
  1192. X          Eol();
  1193. X      }
  1194. X      DelWtSpace();
  1195. X***************
  1196. X*** 588,599 ****
  1197. X              LineInsert(1);
  1198. X              n_indent(indent_pos);
  1199. X          } else
  1200. X!             Insert(*cp);
  1201. X      }
  1202. X      ToMark(open_c_mark);
  1203. X      Eol();
  1204. X!     exp_p = NO;
  1205. X!     DelNChar();
  1206. X  }
  1207. X  
  1208. X  #endif CMT_FMT
  1209. X--- 585,595 ----
  1210. X              LineInsert(1);
  1211. X              n_indent(indent_pos);
  1212. X          } else
  1213. X!             insert_c(*cp, 1);
  1214. X      }
  1215. X      ToMark(open_c_mark);
  1216. X      Eol();
  1217. X!     del_char(FORWARD, 1);
  1218. X  }
  1219. X  
  1220. X  #endif CMT_FMT
  1221. Xdiff -c ojove/case.c jove/case.c
  1222. X*** ojove/case.c    Thu Jul 16 09:14:09 1987
  1223. X--- jove/case.c    Fri Jun 12 10:45:46 1987
  1224. X***************
  1225. X*** 16,31 ****
  1226. X  
  1227. X      DOTsave(&b);
  1228. X  
  1229. X!     if (exp < 0) {
  1230. X          restore++;
  1231. X!         exp = -exp;
  1232. X!         num = exp;
  1233. X!         BackChar();    /* Cap previous EXP chars */
  1234. X!     } else
  1235. X!         num = exp;
  1236. X          
  1237. X-     exp = 1;    /* So all the commands are done once */
  1238. X- 
  1239. X      while (num--) {
  1240. X          if (upper(&linebuf[curchar])) {
  1241. X              modify();
  1242. X--- 16,28 ----
  1243. X  
  1244. X      DOTsave(&b);
  1245. X  
  1246. X!     num = arg_value();
  1247. X!     if (num < 0) {
  1248. X          restore++;
  1249. X!         num = -num;
  1250. X!         b_char(num);    /* Cap previous EXP chars */
  1251. X!     }
  1252. X          
  1253. X      while (num--) {
  1254. X          if (upper(&linebuf[curchar])) {
  1255. X              modify();
  1256. X***************
  1257. X*** 35,42 ****
  1258. X              if (curline->l_next == 0)
  1259. X                  break;
  1260. X              SetLine(curline->l_next);
  1261. X!         }
  1262. X!         else
  1263. X              curchar++;
  1264. X      }
  1265. X      if (restore)
  1266. X--- 32,38 ----
  1267. X              if (curline->l_next == 0)
  1268. X                  break;
  1269. X              SetLine(curline->l_next);
  1270. X!         } else
  1271. X              curchar++;
  1272. X      }
  1273. X      if (restore)
  1274. X***************
  1275. X*** 51,65 ****
  1276. X  
  1277. X      DOTsave(&b);
  1278. X  
  1279. X!     if (exp < 0) {
  1280. X          restore++;
  1281. X!         exp = -exp;
  1282. X!         num = exp;
  1283. X!         BackWord();    /* Cap previous EXP words */
  1284. X!     } else
  1285. X!         num = exp;
  1286. X!         
  1287. X!     exp = 1;    /* So all the commands are done once */
  1288. X  
  1289. X      while (num--) {
  1290. X          to_word(1);    /* Go to the beginning of the next word. */
  1291. X--- 47,58 ----
  1292. X  
  1293. X      DOTsave(&b);
  1294. X  
  1295. X!     num = arg_value();
  1296. X!     if (num < 0) {
  1297. X          restore++;
  1298. X!         num = -num;
  1299. X!         b_word(num);        /* Cap previous EXP words */
  1300. X!     }
  1301. X  
  1302. X      while (num--) {
  1303. X          to_word(1);    /* Go to the beginning of the next word. */
  1304. X***************
  1305. X*** 87,97 ****
  1306. X      Bufpos    before;
  1307. X  
  1308. X      DOTsave(&before);
  1309. X!     ForWord();    /* This'll go backward if negative argument. */
  1310. X      case_reg(before.p_line, before.p_char, curline, curchar, up);
  1311. X  }
  1312. X  
  1313. X! static
  1314. X  upper(c)
  1315. X  register char    *c;
  1316. X  {
  1317. X--- 80,90 ----
  1318. X      Bufpos    before;
  1319. X  
  1320. X      DOTsave(&before);
  1321. X!     ForWord();    /* this'll go backward if negative argument */
  1322. X      case_reg(before.p_line, before.p_char, curline, curchar, up);
  1323. X  }
  1324. X  
  1325. X! private
  1326. X  upper(c)
  1327. X  register char    *c;
  1328. X  {
  1329. X***************
  1330. X*** 121,127 ****
  1331. X      (void) fixorder(&line1, &char1, &line2, &char2);
  1332. X      DotTo(line1, char1);
  1333. X  
  1334. X-     exp = 1;
  1335. X      for (;;) {
  1336. X          if (curline == line2 && curchar == char2)
  1337. X              break;
  1338. X--- 114,119 ----
  1339. X***************
  1340. X*** 130,136 ****
  1341. X                  makedirty(curline);
  1342. X                  modify();
  1343. X              }
  1344. X!         ForChar();
  1345. X      }
  1346. X  }
  1347. X  
  1348. X--- 122,128 ----
  1349. X                  makedirty(curline);
  1350. X                  modify();
  1351. X              }
  1352. X!         f_char(1);
  1353. X      }
  1354. X  }
  1355. X  
  1356. Xdiff -c ojove/ctype.c jove/ctype.c
  1357. X*** ojove/ctype.c    Thu Jul 16 09:14:11 1987
  1358. X--- jove/ctype.c    Wed Feb  4 11:37:21 1987
  1359. X***************
  1360. X*** 89,91 ****
  1361. X--- 89,111 ----
  1362. X  {
  1363. X      return ((CharTable[curbuf->b_major])[c]&(_W));
  1364. X  }
  1365. X+ 
  1366. X+ char CaseEquiv[] = {
  1367. X+     '\000',    '\001',    '\002',    '\003',    '\004',    '\005',    '\006',    '\007',
  1368. X+     '\010',    '\011',    '\012',    '\013',    '\014',    '\015',    '\016',    '\017',
  1369. X+     '\020',    '\021',    '\022',    '\023',    '\024',    '\025',    '\026',    '\027',
  1370. X+     '\030',    '\031',    '\032',    '\033',    '\034',    '\035',    '\036',    '\037',
  1371. X+     '\040',    '!',    '"',    '#',    '$',    '%',    '&',    '\'',
  1372. X+     '(',    ')',    '*',    '+',    ',',    '-',    '.',    '/',
  1373. X+     '0',    '1',    '2',    '3',    '4',    '5',    '6',    '7',
  1374. X+     '8',    '9',    ':',    ';',    '<',    '=',    '>',    '?',
  1375. X+     '@',    'A',    'B',    'C',    'D',    'E',    'F',    'G',
  1376. X+     'H',    'I',    'J',    'K',    'L',    'M',    'N',    'O',
  1377. X+     'P',    'Q',    'R',    'S',    'T',    'U',    'V',    'W',
  1378. X+     'X',    'Y',    'Z',    '[',    '\\',    ']',    '^',    '_',
  1379. X+     '`',    'A',    'B',    'C',    'D',    'E',    'F',    'G',
  1380. X+     'H',    'I',    'J',    'K',    'L',    'M',    'N',    'O',
  1381. X+     'P',    'Q',    'R',    'S',    'T',    'U',    'V',    'W',
  1382. X+     'X',    'Y',    'Z',    '{',    '|',    '}',    '~',    '\177'
  1383. X+ };
  1384. X+ 
  1385. Xdiff -c ojove/delete.c jove/delete.c
  1386. X*** ojove/delete.c    Thu Jul 16 09:14:13 1987
  1387. X--- jove/delete.c    Wed Jun 24 12:43:21 1987
  1388. X***************
  1389. X*** 99,105 ****
  1390. X  
  1391. X  DelNChar()
  1392. X  {
  1393. X!     del_char(1);
  1394. X  }
  1395. X  
  1396. X  /* Delete character backward */
  1397. X--- 99,105 ----
  1398. X  
  1399. X  DelNChar()
  1400. X  {
  1401. X!     del_char(FORWARD, arg_value());
  1402. X  }
  1403. X  
  1404. X  /* Delete character backward */
  1405. X***************
  1406. X*** 107,134 ****
  1407. X  DelPChar()
  1408. X  {
  1409. X      if (MinorMode(OverWrite)) {
  1410. X!         int    count = min(exp, curchar);
  1411. X  
  1412. X!         DoTimes(BackChar(), count);
  1413. X!         LastKeyStruck = ' ';    /* can you say gross? */
  1414. X!         DoTimes(SelfInsert(), count);
  1415. X!         DoTimes(BackChar(), count);
  1416. X      } else        
  1417. X!         del_char(0);
  1418. X  }
  1419. X  
  1420. X! /* Delete some characters.  If deleting `forward' then call for_char
  1421. X     to the final position otherwise call back_char.  Then delete the
  1422. X     region between the two with patchup(). */
  1423. X  
  1424. X! del_char(forward)
  1425. X  {
  1426. X      Bufpos    before,
  1427. X          after;
  1428. X!     int    killp = (exp_p && abs(exp) > 1);
  1429. X  
  1430. X      DOTsave(&before);
  1431. X!     (forward) ? ForChar() : BackChar();
  1432. X      if (before.p_line == curline && before.p_char == curchar)
  1433. X          complain((char *) 0);
  1434. X      if (killp)
  1435. X--- 107,138 ----
  1436. X  DelPChar()
  1437. X  {
  1438. X      if (MinorMode(OverWrite)) {
  1439. X!         int    count = min(arg_value(), curchar);
  1440. X  
  1441. X!         b_char(count);
  1442. X! 
  1443. X!         /* overwrite with spaces */
  1444. X!         set_arg_value(count);
  1445. X!         LastKeyStruck = ' ';
  1446. X!         SelfInsert();
  1447. X! 
  1448. X!         b_char(count);
  1449. X      } else        
  1450. X!         del_char(BACKWARD, arg_value());
  1451. X  }
  1452. X  
  1453. X! /* Delete some characters.  If deleting forward then call for_char
  1454. X     to the final position otherwise call back_char.  Then delete the
  1455. X     region between the two with patchup(). */
  1456. X  
  1457. X! del_char(dir, num)
  1458. X  {
  1459. X      Bufpos    before,
  1460. X          after;
  1461. X!     int    killp = (abs(num) > 1);
  1462. X  
  1463. X      DOTsave(&before);
  1464. X!     (dir == FORWARD) ? f_char(num) : b_char(num);
  1465. X      if (before.p_line == curline && before.p_char == curchar)
  1466. X          complain((char *) 0);
  1467. X      if (killp)
  1468. X***************
  1469. X*** 249,258 ****
  1470. X      register Mark    *dot;
  1471. X      int    all;
  1472. X  
  1473. X-     exp = 1;
  1474. X      if (!blnkp(&linebuf[curchar]))
  1475. X          return;
  1476. X!     dot = MakeMark(curline, curchar, FLOATER);
  1477. X      all = !blnkp(linebuf);
  1478. X      while (blnkp(linebuf) && curline->l_prev)
  1479. X          SetLine(curline->l_prev);
  1480. X--- 253,261 ----
  1481. X      register Mark    *dot;
  1482. X      int    all;
  1483. X  
  1484. X      if (!blnkp(&linebuf[curchar]))
  1485. X          return;
  1486. X!     dot = MakeMark(curline, curchar, M_FLOATER);
  1487. X      all = !blnkp(linebuf);
  1488. X      while (blnkp(linebuf) && curline->l_prev)
  1489. X          SetLine(curline->l_prev);
  1490. X***************
  1491. X*** 259,271 ****
  1492. X      all |= (firstp(curline));
  1493. X      Eol();
  1494. X      DelWtSpace();
  1495. X!     line_move(FORWARD, NO);
  1496. X      while (blnkp(linebuf) && !eobp()) {
  1497. X          DelWtSpace();
  1498. X!         DelNChar();
  1499. X      }
  1500. X      if (!all && !eobp())
  1501. X!         OpenLine();
  1502. X      ToMark(dot);
  1503. X      DelMark(dot);
  1504. X  }
  1505. X--- 262,274 ----
  1506. X      all |= (firstp(curline));
  1507. X      Eol();
  1508. X      DelWtSpace();
  1509. X!     line_move(FORWARD, 1, NO);
  1510. X      while (blnkp(linebuf) && !eobp()) {
  1511. X          DelWtSpace();
  1512. X!         del_char(FORWARD, 1);
  1513. X      }
  1514. X      if (!all && !eobp())
  1515. X!         open_lines(1);
  1516. X      ToMark(dot);
  1517. X      DelMark(dot);
  1518. X  }
  1519. Xdiff -c ojove/disp.c jove/disp.c
  1520. X*** ojove/disp.c    Thu Jul 16 09:14:15 1987
  1521. X--- jove/disp.c    Fri Jul 10 09:25:49 1987
  1522. X***************
  1523. X*** 108,118 ****
  1524. X          if (VisBell && VB)
  1525. X              putstr(VB);
  1526. X          else
  1527. X! #ifdef SYSV    /* release 2, at least */
  1528. X!             putpad("$<20>\007", 1) ;
  1529. X! #else
  1530. X!             putpad("20\007", 1);
  1531. X! #endif SYSV
  1532. X      }
  1533. X      flusho();
  1534. X  }
  1535. X--- 108,114 ----
  1536. X          if (VisBell && VB)
  1537. X              putstr(VB);
  1538. X          else
  1539. X!             putpad(BL, 1);
  1540. X      }
  1541. X      flusho();
  1542. X  }
  1543. X***************
  1544. X*** 787,793 ****
  1545. X          ign_some = 0;
  1546. X      char    line[132],
  1547. X          *fmt = ModeFmt,
  1548. X-         tmp[16],
  1549. X          fillc,
  1550. X          c;
  1551. X      register Buffer    *thisbuf = w->w_bufp;
  1552. X--- 783,788 ----
  1553. X***************
  1554. X*** 889,902 ****
  1555. X                  mode_app("[No file]");
  1556. X              else {
  1557. X                  if (c == 'f')
  1558. X!                     mode_app(pr_name(thisbuf->b_fname));
  1559. X                  else
  1560. X                      mode_app(basename(thisbuf->b_fname));
  1561. X              }
  1562. X              break;
  1563. X  
  1564. X- 
  1565. X          case 'n':
  1566. X              for (bp = world, n = 1; bp != 0; bp = bp->b_next, n++)
  1567. X                  if (bp == thisbuf)
  1568. X                      break;
  1569. X--- 884,899 ----
  1570. X                  mode_app("[No file]");
  1571. X              else {
  1572. X                  if (c == 'f')
  1573. X!                     mode_app(pr_name(thisbuf->b_fname, YES));
  1574. X                  else
  1575. X                      mode_app(basename(thisbuf->b_fname));
  1576. X              }
  1577. X              break;
  1578. X  
  1579. X          case 'n':
  1580. X+             {
  1581. X+             char    tmp[16];
  1582. X+ 
  1583. X              for (bp = world, n = 1; bp != 0; bp = bp->b_next, n++)
  1584. X                  if (bp == thisbuf)
  1585. X                      break;
  1586. X***************
  1587. X*** 904,909 ****
  1588. X--- 901,907 ----
  1589. X              sprintf(tmp, "%d", n);
  1590. X              mode_app(tmp);
  1591. X              break;
  1592. X+             }
  1593. X  
  1594. X          case 'm':
  1595. X              if (IsModified(w->w_bufp))
  1596. X***************
  1597. X*** 933,940 ****
  1598. X                     (int) theavg,
  1599. X                     (int)((theavg - (int) theavg) * 100));
  1600. X                  mode_app(minibuf);
  1601. X              }
  1602. X-             break;
  1603. X  #endif
  1604. X  
  1605. X          case 'C':    /* check mail here */
  1606. X--- 931,938 ----
  1607. X                     (int) theavg,
  1608. X                     (int)((theavg - (int) theavg) * 100));
  1609. X                  mode_app(minibuf);
  1610. X+             break;
  1611. X              }
  1612. X  #endif
  1613. X  
  1614. X          case 'C':    /* check mail here */
  1615. X***************
  1616. X*** 944,950 ****
  1617. X  
  1618. X  #ifdef CHDIR
  1619. X          case 'd':    /* print working directory */
  1620. X!             mode_app(pr_name(pwd()));
  1621. X              break;
  1622. X  #endif
  1623. X              
  1624. X--- 942,948 ----
  1625. X  
  1626. X  #ifdef CHDIR
  1627. X          case 'd':    /* print working directory */
  1628. X!             mode_app(pr_name(pwd(), YES));
  1629. X              break;
  1630. X  #endif
  1631. X              
  1632. X***************
  1633. X*** 958,963 ****
  1634. X--- 956,975 ----
  1635. X  
  1636. X                  goto outahere;        /* %e means we're done! */
  1637. X              }
  1638. X+ 
  1639. X+ #ifdef IPROCS
  1640. X+         case 'p':
  1641. X+             if (thisbuf->b_type != B_PROCESS) {
  1642. X+             char    tmp[40];
  1643. X+ 
  1644. X+             sprintf(tmp, "(%s)", (thisbuf->b_process == 0) ?
  1645. X+                          "No process" :
  1646. X+                          pstate(thisbuf->b_process));
  1647. X+             mode_app(tmp);
  1648. X+             break;
  1649. X+             }
  1650. X+ #endif
  1651. X+ 
  1652. X          }
  1653. X      }
  1654. X  
  1655. X***************
  1656. X*** 980,987 ****
  1657. X  
  1658. X  RedrawDisplay()
  1659. X  {
  1660. X!     Line    *newtop = prev_line((curwind->w_line = curline), exp_p ?
  1661. X!                 exp : HALF(curwind));
  1662. X  
  1663. X      if (newtop == curwind->w_top)
  1664. X          v_clear(FLine(curwind), FLine(curwind) + SIZE(curwind));
  1665. X--- 992,999 ----
  1666. X  
  1667. X  RedrawDisplay()
  1668. X  {
  1669. X!     Line    *newtop = prev_line((curwind->w_line = curline), is_an_arg() ?
  1670. X!                 arg_value() : HALF(curwind));
  1671. X  
  1672. X      if (newtop == curwind->w_top)
  1673. X          v_clear(FLine(curwind), FLine(curwind) + SIZE(curwind));
  1674. X***************
  1675. X*** 1016,1027 ****
  1676. X  
  1677. X      if (Asking)
  1678. X          return;
  1679. X!     if (exp < 0) {
  1680. X!         exp = -exp;
  1681. X          PrevPage();
  1682. X          return;
  1683. X      }
  1684. X!     if (exp_p == YES)
  1685. X          UpScroll();
  1686. X      else {
  1687. X          if (in_window(curwind, curwind->w_bufp->b_last) != -1) {
  1688. X--- 1028,1039 ----
  1689. X  
  1690. X      if (Asking)
  1691. X          return;
  1692. X!     if (arg_value() < 0) {
  1693. X!         negate_arg_value();
  1694. X          PrevPage();
  1695. X          return;
  1696. X      }
  1697. X!     if (arg_type() == YES)
  1698. X          UpScroll();
  1699. X      else {
  1700. X          if (in_window(curwind, curwind->w_bufp->b_last) != -1) {
  1701. X***************
  1702. X*** 1041,1052 ****
  1703. X  
  1704. X      if (Asking)
  1705. X          return;
  1706. X!     if (exp < 0) {
  1707. X!         exp = -exp;
  1708. X          NextPage();
  1709. X          return;
  1710. X      }
  1711. X!     if (exp_p == YES)
  1712. X          DownScroll();
  1713. X      else {
  1714. X          newline = prev_line(curwind->w_top, max(1, SIZE(curwind) - 1));
  1715. X--- 1053,1064 ----
  1716. X  
  1717. X      if (Asking)
  1718. X          return;
  1719. X!     if (arg_value() < 0) {
  1720. X!         negate_arg_value();
  1721. X          NextPage();
  1722. X          return;
  1723. X      }
  1724. X!     if (arg_type() == YES)
  1725. X          DownScroll();
  1726. X      else {
  1727. X          newline = prev_line(curwind->w_top, max(1, SIZE(curwind) - 1));
  1728. X***************
  1729. X*** 1058,1064 ****
  1730. X  
  1731. X  UpScroll()
  1732. X  {
  1733. X!     SetTop(curwind, next_line(curwind->w_top, exp));
  1734. X      if ((curwind->w_bufp == curbuf) &&
  1735. X          (in_window(curwind, curline) == -1))
  1736. X          SetLine(curwind->w_top);
  1737. X--- 1070,1076 ----
  1738. X  
  1739. X  UpScroll()
  1740. X  {
  1741. X!     SetTop(curwind, next_line(curwind->w_top, arg_value()));
  1742. X      if ((curwind->w_bufp == curbuf) &&
  1743. X          (in_window(curwind, curline) == -1))
  1744. X          SetLine(curwind->w_top);
  1745. X***************
  1746. X*** 1066,1072 ****
  1747. X  
  1748. X  DownScroll()
  1749. X  {
  1750. X!     SetTop(curwind, prev_line(curwind->w_top, exp));
  1751. X      if ((curwind->w_bufp == curbuf) &&
  1752. X          (in_window(curwind, curline) == -1))
  1753. X          SetLine(curwind->w_top);
  1754. X--- 1078,1084 ----
  1755. X  
  1756. X  DownScroll()
  1757. X  {
  1758. X!     SetTop(curwind, prev_line(curwind->w_top, arg_value()));
  1759. X      if ((curwind->w_bufp == curbuf) &&
  1760. X          (in_window(curwind, curline) == -1))
  1761. X          SetLine(curwind->w_top);
  1762. X***************
  1763. X*** 1101,1108 ****
  1764. X      if (Asking)
  1765. X          return;
  1766. X      SetLine(next_line(curwind->w_top, SIZE(curwind) - 1 -
  1767. X!             min(SIZE(curwind) - 1, exp - 1)));
  1768. X!     if (exp_p == NO)
  1769. X          Eol();
  1770. X  }
  1771. X  
  1772. X--- 1113,1120 ----
  1773. X      if (Asking)
  1774. X          return;
  1775. X      SetLine(next_line(curwind->w_top, SIZE(curwind) - 1 -
  1776. X!             min(SIZE(curwind) - 1, arg_value() - 1)));
  1777. X!     if (!is_an_arg())
  1778. X          Eol();
  1779. X  }
  1780. X  
  1781. X***************
  1782. X*** 1112,1118 ****
  1783. X  {
  1784. X      if (Asking)
  1785. X          return;
  1786. X!     SetLine(next_line(curwind->w_top, min(SIZE(curwind) - 1, exp - 1)));
  1787. X  }
  1788. X  
  1789. X  private int    LineNo,
  1790. X--- 1124,1130 ----
  1791. X  {
  1792. X      if (Asking)
  1793. X          return;
  1794. X!     SetLine(next_line(curwind->w_top, min(SIZE(curwind) - 1, arg_value() - 1)));
  1795. X  }
  1796. X  
  1797. X  private int    LineNo,
  1798. X***************
  1799. X*** 1158,1164 ****
  1800. X          f_mess("--more--");
  1801. X          if ((c = getchar()) != ' ') {
  1802. X              TOabort++;
  1803. X!             if (c != CTL(G) && c != RUBOUT)
  1804. X                  Ungetc(c);
  1805. X              return;
  1806. X          }
  1807. X--- 1170,1176 ----
  1808. X          f_mess("--more--");
  1809. X          if ((c = getchar()) != ' ') {
  1810. X              TOabort++;
  1811. X!             if (c != CTL('G') && c != RUBOUT)
  1812. X                  Ungetc(c);
  1813. X              return;
  1814. X          }
  1815. XCommon subdirectories: ojove/doc and jove/doc
  1816. Xdiff -c ojove/extend.c jove/extend.c
  1817. X*** ojove/extend.c    Thu Jul 16 09:14:18 1987
  1818. X--- jove/extend.c    Tue Jun 23 13:50:18 1987
  1819. X***************
  1820. X*** 78,86 ****
  1821. X  {
  1822. X      register int    i;
  1823. X  
  1824. X!     exp_p = YES;
  1825. X!     exp = 1;    /* So minor modes don't toggle.  We always want
  1826. X!                them on. */
  1827. X      if (new == 0)
  1828. X          return;
  1829. X      for (i = 0; i < ExecIndex; i++)
  1830. X--- 78,84 ----
  1831. X  {
  1832. X      register int    i;
  1833. X  
  1834. X!     set_arg_value(1);
  1835. X      if (new == 0)
  1836. X          return;
  1837. X      for (i = 0; i < ExecIndex; i++)
  1838. X***************
  1839. X*** 165,171 ****
  1840. X          } else if (c == '^') {
  1841. X              if ((c = getch()) == '?')
  1842. X                  c = RUBOUT;
  1843. X!             else if (isalpha(c) || index("[\\]^_", c))
  1844. X                  c = c - '@';
  1845. X              else
  1846. X                  complain("[Unknown control character]");
  1847. X--- 163,169 ----
  1848. X          } else if (c == '^') {
  1849. X              if ((c = getch()) == '?')
  1850. X                  c = RUBOUT;
  1851. X!             else if (isalpha(c) || index("@[\\]^_", c))
  1852. X                  c = c - '@';
  1853. X              else
  1854. X                  complain("[Unknown control character]");
  1855. X***************
  1856. X*** 320,326 ****
  1857. X              sprintf(keydescbuf, "%s %p", pref, c1);
  1858. X          else
  1859. X              sprintf(keydescbuf, "%s [%p-%p]", pref, c1, c2);
  1860. X!         if (prefp = IsPrefix(map[c1]))
  1861. X              DescMap(prefp, keydescbuf);
  1862. X          else
  1863. X              Typeout("%-14s%s", keydescbuf, map[c1]->Name);
  1864. X--- 318,324 ----
  1865. X              sprintf(keydescbuf, "%s %p", pref, c1);
  1866. X          else
  1867. X              sprintf(keydescbuf, "%s [%p-%p]", pref, c1, c2);
  1868. X!         if ((prefp = IsPrefix(map[c1])) && (prefp != map))
  1869. X              DescMap(prefp, keydescbuf);
  1870. X          else
  1871. X              Typeout("%-14s%s", keydescbuf, map[c1]->Name);
  1872. X***************
  1873. X*** 377,383 ****
  1874. X                  break;
  1875. X              }
  1876. X          }
  1877. X!         if (prefp = IsPrefix(map[c1])) {
  1878. X              sprintf(prefbuf, "%p", c1);
  1879. X              fb_aux(cp, prefp, prefbuf, bufp);
  1880. X          }
  1881. X--- 375,381 ----
  1882. X                  break;
  1883. X              }
  1884. X          }
  1885. X!         if ((prefp = IsPrefix(map[c1])) && (prefp != map))  {
  1886. X              sprintf(prefbuf, "%p", c1);
  1887. X              fb_aux(cp, prefp, prefbuf, bufp);
  1888. X          }
  1889. X***************
  1890. X*** 640,654 ****
  1891. X              comp_value = NULLSTRING;
  1892. X              return 0;
  1893. X          }
  1894. X!         if (comp_flags & RET_STATE) switch (command) {
  1895. X!             case UNIQUE:
  1896. X!             case ORIGINAL:
  1897. X!             case NULLSTRING:
  1898. X!                 comp_value = command;
  1899. X!                 return 0;
  1900. X! 
  1901. X!             default:
  1902. X!                 break;
  1903. X          }
  1904. X          if (InJoverc)
  1905. X              complain("[\"%s\" unknown]", linebuf);
  1906. X--- 638,646 ----
  1907. X              comp_value = NULLSTRING;
  1908. X              return 0;
  1909. X          }
  1910. X!         if (comp_flags & RET_STATE) {
  1911. X!             comp_value = command;
  1912. X!             return 0;
  1913. X          }
  1914. X          if (InJoverc)
  1915. X              complain("[\"%s\" unknown]", linebuf);
  1916. X***************
  1917. X*** 800,812 ****
  1918. X          nchars += length(lp) + (lp->l_next != 0); /* include the NL */
  1919. X      }
  1920. X  
  1921. X!     s_mess("[\"%s\" line %d of %d, char %D of %D (%d%%)]",
  1922. X!             filename(curbuf),
  1923. X!             dotline,
  1924. X!             i,
  1925. X!             dotchar,
  1926. X!             nchars,
  1927. X!             (int) (((long) dotchar * 100) / nchars));
  1928. X  }
  1929. X  
  1930. X  #define IF_UNBOUND    -1
  1931. X--- 792,802 ----
  1932. X          nchars += length(lp) + (lp->l_next != 0); /* include the NL */
  1933. X      }
  1934. X  
  1935. X!     s_mess("[\"%s\" line %d/%d, char %D/%D (%d%%), cursor = %d/%d]",
  1936. X!            filename(curbuf), dotline, i, dotchar, nchars,
  1937. X!            (nchars == 0) ? 100 : (int) (((long) dotchar * 100) / nchars),
  1938. X!            calc_pos(linebuf, curchar),
  1939. X!            calc_pos(linebuf, strlen(linebuf)));
  1940. X  }
  1941. X  
  1942. X  #define IF_UNBOUND    -1
  1943. X***************
  1944. X*** 884,890 ****
  1945. X          Buffer    *savebuf = curbuf;
  1946. X  
  1947. X          SetBuf(do_select((Window *) 0, "RC errors"));
  1948. X!         ins_str(sprint("%s:%d:%s\t%s\n", pr_name(file), lnum, lbuf, mesgbuf), NO);
  1949. X          unmodify();
  1950. X          SetBuf(savebuf);
  1951. X          Asking = 0;
  1952. X--- 874,880 ----
  1953. X          Buffer    *savebuf = curbuf;
  1954. X  
  1955. X          SetBuf(do_select((Window *) 0, "RC errors"));
  1956. X!         ins_str(sprint("%s:%d:%s\t%s\n", pr_name(file, YES), lnum, lbuf, mesgbuf), NO);
  1957. X          unmodify();
  1958. X          SetBuf(savebuf);
  1959. X          Asking = 0;
  1960. Xdiff -c ojove/fmt.c jove/fmt.c
  1961. X*** ojove/fmt.c    Thu Jul 16 09:14:21 1987
  1962. X--- jove/fmt.c    Fri May 29 12:49:31 1987
  1963. X***************
  1964. X*** 33,42 ****
  1965. X      putc('\0', sp);
  1966. X  }
  1967. X  
  1968. X! static char    padc = ' ';
  1969. X! static File    *curiop = 0;
  1970. X! 
  1971. X! static
  1972. X  PPchar(c, str)
  1973. X  int    c;
  1974. X  char    *str;
  1975. X--- 33,39 ----
  1976. X      putc('\0', sp);
  1977. X  }
  1978. X  
  1979. X! private
  1980. X  PPchar(c, str)
  1981. X  int    c;
  1982. X  char    *str;
  1983. X***************
  1984. X*** 53,98 ****
  1985. X          sprintf(cp, "%c", c);
  1986. X  }
  1987. X  
  1988. X! static
  1989. X! putld(leftadj, width, d, base)
  1990. X  long    d;
  1991. X  {
  1992. X      int    length = 1;
  1993. X      long    tmpd = d;
  1994. X  
  1995. X      while (tmpd = (tmpd / base))
  1996. X          length++;
  1997. X      if (d < 0)
  1998. X          length++;
  1999. X!     if (!leftadj)
  2000. X!         pad(padc, width - length);
  2001. X      if (d < 0) {
  2002. X!         putc('-', curiop);
  2003. X          d = -d;
  2004. X      }
  2005. X      outld(d, base);
  2006. X!     if (leftadj)
  2007. X!         pad(padc, width - length);
  2008. X  }
  2009. X  
  2010. X! static
  2011. X  outld(d, base)
  2012. X  long    d;
  2013. X  {
  2014. X!     long    n;
  2015. X  
  2016. X      if (n = (d / base))
  2017. X          outld(n, base);
  2018. X!     putc((int) ('0' + (int) (d % base)), curiop);
  2019. X  }
  2020. X  
  2021. X! static
  2022. X! puts(leftadj, width, str)
  2023. X  char    *str;
  2024. X  {
  2025. X      int    length;
  2026. X!     register char    *cp,
  2027. X!             c;
  2028. X  
  2029. X      if (str == 0)
  2030. X  #if pyr
  2031. X--- 50,106 ----
  2032. X          sprintf(cp, "%c", c);
  2033. X  }
  2034. X  
  2035. X! private struct fmt_state {
  2036. X!     int    precision,
  2037. X!         width,
  2038. X!         leftadj;
  2039. X!     char    padc;
  2040. X!     File    *iop;
  2041. X! } current_fmt;
  2042. X! 
  2043. X! private
  2044. X! putld(d, base)
  2045. X  long    d;
  2046. X  {
  2047. X      int    length = 1;
  2048. X      long    tmpd = d;
  2049. X  
  2050. X+     if (current_fmt.width == 0 && current_fmt.precision) {
  2051. X+         current_fmt.width = current_fmt.precision;
  2052. X+         current_fmt.padc = '0';
  2053. X+     }
  2054. X      while (tmpd = (tmpd / base))
  2055. X          length++;
  2056. X      if (d < 0)
  2057. X          length++;
  2058. X!     if (!current_fmt.leftadj)
  2059. X!         pad(current_fmt.padc, current_fmt.width - length);
  2060. X      if (d < 0) {
  2061. X!         putc('-', current_fmt.iop);
  2062. X          d = -d;
  2063. X      }
  2064. X      outld(d, base);
  2065. X!     if (current_fmt.leftadj)
  2066. X!         pad(current_fmt.padc, current_fmt.width - length);
  2067. X  }
  2068. X  
  2069. X! private
  2070. X  outld(d, base)
  2071. X  long    d;
  2072. X  {
  2073. X!     register long    n;
  2074. X  
  2075. X      if (n = (d / base))
  2076. X          outld(n, base);
  2077. X!     putc((int) ('0' + (int) (d % base)), current_fmt.iop);
  2078. X  }
  2079. X  
  2080. X! private
  2081. X! puts(str)
  2082. X  char    *str;
  2083. X  {
  2084. X      int    length;
  2085. X!     register char    *cp;
  2086. X  
  2087. X      if (str == 0)
  2088. X  #if pyr
  2089. X***************
  2090. X*** 101,125 ****
  2091. X          str = "(null)";
  2092. X  #endif
  2093. X      length = strlen(str);
  2094. X      cp = str;
  2095. X!     if (!leftadj)
  2096. X!         pad(' ', width - length);
  2097. X!     while (c = *cp++)
  2098. X!         putc(c, curiop);
  2099. X!     if (leftadj)
  2100. X!         pad(' ', width - length);
  2101. X  }
  2102. X  
  2103. X! static
  2104. X  pad(c, amount)
  2105. X  register int    c,
  2106. X          amount;
  2107. X  {
  2108. X      while (--amount >= 0)
  2109. X!         putc(c, curiop);
  2110. X  }
  2111. X  
  2112. X! static
  2113. X  doformat(sp, fmt, ap)
  2114. X  register File    *sp;
  2115. X  register char    *fmt;
  2116. X--- 109,137 ----
  2117. X          str = "(null)";
  2118. X  #endif
  2119. X      length = strlen(str);
  2120. X+     if (current_fmt.precision == 0 || length < current_fmt.precision)
  2121. X+         current_fmt.precision = length;
  2122. X+     else
  2123. X+         length = current_fmt.precision;
  2124. X      cp = str;
  2125. X!     if (!current_fmt.leftadj)
  2126. X!         pad(' ', current_fmt.width - length);
  2127. X!     while (--current_fmt.precision >= 0)
  2128. X!         putc(*cp++, current_fmt.iop);
  2129. X!     if (current_fmt.leftadj)
  2130. X!         pad(' ', current_fmt.width - length);
  2131. X  }
  2132. X  
  2133. X! private
  2134. X  pad(c, amount)
  2135. X  register int    c,
  2136. X          amount;
  2137. X  {
  2138. X      while (--amount >= 0)
  2139. X!         putc(c, current_fmt.iop);
  2140. X  }
  2141. X  
  2142. X! private
  2143. X  doformat(sp, fmt, ap)
  2144. X  register File    *sp;
  2145. X  register char    *fmt;
  2146. X***************
  2147. X*** 126,171 ****
  2148. X  va_list    ap;
  2149. X  {
  2150. X      register char    c;
  2151. X!     int    leftadj,
  2152. X!         width;
  2153. X!     File    *pushiop = curiop;
  2154. X  
  2155. X!     curiop = sp;
  2156. X  
  2157. X      while (c = *fmt++) {
  2158. X          if (c != '%') {
  2159. X!             putc(c, sp);
  2160. X              continue;
  2161. X          }
  2162. X  
  2163. X!         padc = ' ';
  2164. X!         leftadj = width = 0;
  2165. X          c = *fmt++;
  2166. X          if (c == '-') {
  2167. X!             leftadj++;
  2168. X              c = *fmt++;
  2169. X          }
  2170. X          if (c == '0') {
  2171. X!             padc = '0';
  2172. X              c = *fmt++;
  2173. X          }
  2174. X          while (c >= '0' && c <= '9') {
  2175. X!             width = width * 10 + (c - '0');
  2176. X              c = *fmt++;
  2177. X          }
  2178. X          if (c == '*') {
  2179. X!             width = va_arg(ap, int);
  2180. X              c = *fmt++;
  2181. X          }
  2182. X      reswitch:
  2183. X          /* At this point, fmt points at one past the format letter. */
  2184. X          switch (c) {
  2185. X          case '%':
  2186. X!             putc('%', curiop);
  2187. X              break;
  2188. X      
  2189. X          case 'D':
  2190. X!             putld(leftadj, width, va_arg(ap, long), 10);
  2191. X              break;
  2192. X      
  2193. X          case 'b':
  2194. X--- 138,193 ----
  2195. X  va_list    ap;
  2196. X  {
  2197. X      register char    c;
  2198. X!     struct fmt_state    prev_fmt;
  2199. X  
  2200. X!     prev_fmt = current_fmt;
  2201. X!     current_fmt.iop = sp;
  2202. X  
  2203. X      while (c = *fmt++) {
  2204. X          if (c != '%') {
  2205. X!             putc(c, current_fmt.iop);
  2206. X              continue;
  2207. X          }
  2208. X  
  2209. X!         current_fmt.padc = ' ';
  2210. X!         current_fmt.precision = current_fmt.leftadj = current_fmt.width = 0;
  2211. X          c = *fmt++;
  2212. X          if (c == '-') {
  2213. X!             current_fmt.leftadj = YES;
  2214. X              c = *fmt++;
  2215. X          }
  2216. X          if (c == '0') {
  2217. X!             current_fmt.padc = '0';
  2218. X              c = *fmt++;
  2219. X          }
  2220. X          while (c >= '0' && c <= '9') {
  2221. X!             current_fmt.width = current_fmt.width * 10 + (c - '0');
  2222. X              c = *fmt++;
  2223. X          }
  2224. X          if (c == '*') {
  2225. X!             current_fmt.width = va_arg(ap, int);
  2226. X              c = *fmt++;
  2227. X          }
  2228. X+         if (c == '.') {
  2229. X+             c = *fmt++;
  2230. X+             while (c >= '0' && c <= '9') {
  2231. X+                 current_fmt.precision = current_fmt.precision * 10 + (c - '0');
  2232. X+                 c = *fmt++;
  2233. X+             }
  2234. X+             if (c == '*') {
  2235. X+                 current_fmt.precision = va_arg(ap, int);
  2236. X+                 c = *fmt++;
  2237. X+             }
  2238. X+         }
  2239. X      reswitch:
  2240. X          /* At this point, fmt points at one past the format letter. */
  2241. X          switch (c) {
  2242. X          case '%':
  2243. X!             putc('%', current_fmt.iop);
  2244. X              break;
  2245. X      
  2246. X          case 'D':
  2247. X!             putld(va_arg(ap, long), 10);
  2248. X              break;
  2249. X      
  2250. X          case 'b':
  2251. X***************
  2252. X*** 172,204 ****
  2253. X              {
  2254. X              Buffer    *b = va_arg(ap, Buffer *);
  2255. X  
  2256. X!             puts(leftadj, width, b->b_name);
  2257. X              break;
  2258. X              }
  2259. X  
  2260. X          case 'c':
  2261. X!             putc(va_arg(ap, int), curiop);
  2262. X              break;
  2263. X      
  2264. X          case 'd':
  2265. X!             putld(leftadj, width, (long) va_arg(ap, int), 10);
  2266. X              break;
  2267. X      
  2268. X          case 'f':    /* current command name gets inserted here! */
  2269. X!             puts(leftadj, width, LastCmd->Name);
  2270. X              break;
  2271. X  
  2272. X          case 'l':
  2273. X!             c = Upper(*++fmt);
  2274. X              goto reswitch;
  2275. X      
  2276. X          case 'n':
  2277. X              if (va_arg(ap, int) != 1)
  2278. X!                 puts(leftadj, width, "s");
  2279. X              break;
  2280. X  
  2281. X          case 'o':
  2282. X!             putld(leftadj, width, (long) va_arg(ap, int), 8);
  2283. X              break;
  2284. X      
  2285. X          case 'p':
  2286. X--- 194,226 ----
  2287. X              {
  2288. X              Buffer    *b = va_arg(ap, Buffer *);
  2289. X  
  2290. X!             puts(b->b_name);
  2291. X              break;
  2292. X              }
  2293. X  
  2294. X          case 'c':
  2295. X!             putc(va_arg(ap, int), current_fmt.iop);
  2296. X              break;
  2297. X      
  2298. X          case 'd':
  2299. X!             putld((long) va_arg(ap, int), 10);
  2300. X              break;
  2301. X      
  2302. X          case 'f':    /* current command name gets inserted here! */
  2303. X!             puts(LastCmd->Name);
  2304. X              break;
  2305. X  
  2306. X          case 'l':
  2307. X!             c = CharUpcase(*++fmt);
  2308. X              goto reswitch;
  2309. X      
  2310. X          case 'n':
  2311. X              if (va_arg(ap, int) != 1)
  2312. X!                 puts("s");
  2313. X              break;
  2314. X  
  2315. X          case 'o':
  2316. X!             putld((long) va_arg(ap, int), 8);
  2317. X              break;
  2318. X      
  2319. X          case 'p':
  2320. X***************
  2321. X*** 206,217 ****
  2322. X                  char    cbuf[20];
  2323. X  
  2324. X                  PPchar(va_arg(ap, int), cbuf);
  2325. X!                 puts(leftadj, width, cbuf);
  2326. X                  break;
  2327. X              }
  2328. X  
  2329. X          case 's':
  2330. X!             puts(leftadj, width, va_arg(ap, char *));
  2331. X              break;
  2332. X          
  2333. X          default:
  2334. X--- 228,239 ----
  2335. X                  char    cbuf[20];
  2336. X  
  2337. X                  PPchar(va_arg(ap, int), cbuf);
  2338. X!                 puts(cbuf);
  2339. X                  break;
  2340. X              }
  2341. X  
  2342. X          case 's':
  2343. X!             puts(va_arg(ap, char *));
  2344. X              break;
  2345. X          
  2346. X          default:
  2347. X***************
  2348. X*** 218,224 ****
  2349. X              complain("Unknown format directive: \"%%%c\"", c);
  2350. X          }
  2351. X      }
  2352. X!     curiop = pushiop;
  2353. X  }
  2354. X  
  2355. X  /* VARARGS1 */
  2356. X--- 240,246 ----
  2357. X              complain("Unknown format directive: \"%%%c\"", c);
  2358. X          }
  2359. X      }
  2360. X!     current_fmt = prev_fmt;
  2361. X  }
  2362. X  
  2363. X  /* VARARGS1 */
  2364. END_OF_FILE
  2365. if test 51694 -ne `wc -c <'jove.pch.1'`; then
  2366.     echo shar: \"'jove.pch.1'\" unpacked with wrong size!
  2367. fi
  2368. # end of 'jove.pch.1'
  2369. fi
  2370. echo shar: End of archive 1 \(of 4\).
  2371. cp /dev/null ark1isdone
  2372. MISSING=""
  2373. for I in 1 2 3 4 ; do
  2374.     if test ! -f ark${I}isdone ; then
  2375.     MISSING="${MISSING} ${I}"
  2376.     fi
  2377. done
  2378. if test "${MISSING}" = "" ; then
  2379.     echo You have unpacked all 4 archives.
  2380.     rm -f ark[1-9]isdone
  2381. else
  2382.     echo You still need to unpack the following archives:
  2383.     echo "        " ${MISSING}
  2384. fi
  2385. ##  End of shell archive.
  2386. exit 0
  2387.